package com.hong.spring.controller;


import com.hong.spring.config.SystemInfo;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Auther: csh
 * @Date: 2020/8/18 17:36
 * @Description:
 */
@Controller
@RequestMapping("/")
@Log4j2
public class IndexController {

    @Autowired
    private SystemInfo systemInfo;

    @RequestMapping
    public String index(){
        log.info("首页");
        return "index";
    }
    /**
     *
     * 功能描述:获取系统配置名称
     *
     * @param:
     * @return:
     * @auther: csh
     * @date: 2020/9/16 17:47
     */
    @RequestMapping(value = "systemName")
    @ResponseBody
    public String systemName(){
        return systemInfo.getSystemName();
    }
}
